package com.example.team_9th;

import androidx.appcompat.app.AppCompatActivity;

import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.ImageView;

public class MainActivity extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        final Button btnDjh = findViewById(R.id.btn_djh);
        final Button btnCnq = findViewById(R.id.btn_cnq);
        final Button btnLzc = findViewById(R.id.btn_lzc);

        final ImageView imageView = findViewById(R.id.photo);

        btnDjh.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                if (view == btnDjh) {
                    imageView.setImageResource(R.drawable.djh);
                }
            }
        });
        btnCnq.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                if (view == btnCnq) {
                    imageView.setImageResource(R.drawable.cnq);
                }
            }
        });
        btnLzc.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                if (view == btnLzc) {
                    imageView.setImageResource(R.drawable.lzc);
                }
            }
        });
    }
}
